package org.song.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.song.model.entity.UserEntity;
import org.springframework.lang.NonNull;

@Mapper
public interface UserMapper {

    int deleteUser( @NonNull UserEntity blog);

    int insertUser( @NonNull UserEntity blog);

    int updateUser( @NonNull UserEntity blog);

    UserEntity selectUser(@NonNull @Param( value = "creatorId" ) Long creatorId );

    /**
     * 根据用户名获取用户信息
     * @param username
     * @return
     */
    @NonNull
    UserEntity getUserByUsername(@NonNull @Param( value = "username" ) String username );

}
